//
//  YXNavigationBar.swift
//  E-CycleForShop
//
//  Created by enghou on 17/3/7.
//  Copyright © 2017年 xyxorigation. All rights reserved.
//

import UIKit

class YXNavigationBar: UINavigationBar {

    override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
        let view = super.hitTest(point, with: event)
        if view == nil {
            for item in self.subviews {
                let pt = item.convert(point, from: self)
                if item.bounds.contains(pt){
                    return item
                }
            }
        }else{
            return view
        }
        return view
    }
    /*
    // Only override draw() if you perform custom drawing.
    // An empty implementation adversely affects performance during animation.
    override func draw(_ rect: CGRect) {
        // Drawing code
    }
    */

}
